<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8" />
	<title>ajax的请求方法</title>
	<script src="jquery.js"></script>
</head>
<body>
	
	<form action="index.html" method="get">
			
			<input type="text" name="username" placeholder="请输入用户名" > <br />
			<input type="password" name="passwor" placeholder="请输入密码" > <br />
			<button type="submit" >登录</button>
		</form>
</body>
<script type="text/javascript">
	//AJAX:
	//异步的js与xml
	//在不重载页面的前提下更新页面数据
	$('form').sumbit(function(ev){
		ev.preventDefault();
		//获取表单数据,自动将其转换成字符串序列化对
		var data = $(this).serialize();
		$.get('index.html',data,function(resData){
			
		})
	})
</script>
</html>